#ifndef TYPES_H
#define TYPES_H

#include <iostream>
#include <QVector>
#include <QMap>

using std::cout;
using std::endl;


#define BWING 0
#define FWING 1
#define LWING 2
#define WINGTIP 3
#define EMPENNAGE 4
#define BWINGTIP 5
#define OWING 6

struct Point
{
    double x;
    double y;

    Point(double xc = 0.0, double yc = 0.0) : x(xc), y(yc) {}
    void show() const {cout << "(" << x << ", " << y << ")";}
};

enum Axis{AXIS_X, AXIS_Y, AXIS_Z};

struct Point3D
{
    double x;
    double y;
    double z;

    Point3D(double xc = 0.0, double yc = 0.0, double zc = 0.0) : x(xc), y(yc), z(zc) {}
    Point3D &operator *(double c);
    Point3D &rotate(Axis axis, double angle);
    Point3D &scale(double c);
    Point3D &translate(const Point3D &tp);
    double distance(const Point3D &) const;
    void show() const;
    const QString rep() const;
};

Point3D *operator -(const Point3D &p0, const Point3D &p1);

typedef QVector<Point3D *> Refcurve; // the reference curve type
typedef QMap<QString, QVector<Point *> > Airfoils_curve_map; // the airfoils curve type

typedef QVector<Point3D *> Zone;
struct time_zone // a time zone of the simulation
{
    QVector<Zone> zones; // the zones belongs to a specified time zone
    QVector<int> columns; // the columns belongs to a specified time zone
    QVector<QString> colours; // the colours belongs to a specified time zone
};

#endif // TYPES_H
